package com.xqt.dao;

import com.xqt.entity.User;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by Administrator on 2017/3/10.
 */
@Repository
public class UserDao {

    @Autowired
    @Qualifier("readSqlSession")
    private SqlSessionTemplate readSqlSession;

    public List<User> selectUser() {
        return readSqlSession.selectList("xqt.user.selectUser");
    }

    public User getUser() {
        return readSqlSession.selectOne("xqt.user.selectUser");
    }

}
